package com.itheima.springbootconfig.cotroller;

import com.itheima.springbootconfig.pojo.Students;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConfigController {
    //@Value("${personName}")
    //private String personName;
    @Autowired
    private Students students;
    @Value("${person.name}")
    private String username;
    @RequestMapping("/config")
    public Students configTest() {
        return students;
    }
}
